﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/Admin.master" AutoEventWireup="true"
    CodeFile="List.aspx.cs" Inherits="List_List" Title="我的收藏" %>

<%@ Register Assembly="WFNetCtrl" Namespace="WFNetCtrl" TagPrefix="cc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="Conut1" runat="Server">
    <script type="text/javascript">
        //全选或反选
        function Sel(ID) {
            oEl = event.srcElement;
            if (oEl.checked) {
                for (i = 0; i < document.all.length; i++) {
                    if (document.all(i).id.indexOf("rbSel") != -1) {
                        document.all(i).checked = false;
                    }
                }
                oEl.checked = true;
                for (i = 0; i < document.all.length; i++) {
                    if (document.all(i).id.indexOf("lbID") != -1) {
                        document.all(i).value = ID;
                    }
                }
            }
        }
    </script>

    <table width="100%">
        <tr>
            <td>
                <%--<div style="width: 100%; height: 400px; overflow: auto">--%>
                <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="False" Width="100%"
                    PageSize="25" onrowdatabound="gvList_RowDataBound">
                    <Columns>
                        <asp:TemplateField HeaderText="选择" ItemStyle-Width="20">
                            <ItemTemplate>
                                <asp:RadioButton ID="rbSel" runat="server"
                                    AutoPostBack="false"/>
                            </ItemTemplate>
                            <ItemStyle Width="5%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="收藏分类">
                            <ItemTemplate>
                                <a href="Browse.aspx?listid=<%# Eval("ID") %>" title='<%# Eval("Name") %>' target="_blank">
                                    <%# Eval("Name") %></a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="作者" DataField="UserID" />
                        <asp:BoundField HeaderText="创建时间" DataField="CreateTime" />
                        <asp:BoundField HeaderText="简介" DataField="Remark" />
                    </Columns>
                    <RowStyle HorizontalAlign="Center" BackColor="#EFF3FB" />
                    <EmptyDataTemplate>
                        <font color="red" style="font-size: large; color: red; text-decoration: underline;">
                            无符合条件的记录</font>
                    </EmptyDataTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
                <%--</div>--%>
            </td>
        </tr>
        <tr>
            <td>
                <cc1:DefaultPager ID="pGrid" runat="server" Align="Right" OnClick="pGrid_OnClick">
                </cc1:DefaultPager>
            </td>
        </tr>
        <tr>
            <td>
                <div align="center">
                    <asp:Button ID="btnAdd" runat="server" Text="手动添加收藏" OnClick="btnAdd_Click"></asp:Button>
                    <asp:Button ID="btnTranAdd" runat="server" Text="批量添加收藏" 
                        OnClick="btnTranAdd_Click"></asp:Button><asp:Button ID="btnDel" 
                        runat="server" Text="删除收藏" OnClick="btnDel_Click" OnClientClick="return window.confirm('您真的要删除吗？')"></asp:Button>
                </div>
            </td>
        </tr>
    </table>
        <input id="lbID" type="hidden" name="lbID" runat="server" />
</asp:Content>
